def convert_time(year, month, day, hour, minute, second, region):
    # 处理月份、日期、小时等为两位格式
    month = f"{month:02d}"
    day = f"{day:02d}"
    hour = f"{hour:02d}"
    minute = f"{minute:02d}"
    second = f"{second:02d}"
    year = str(year)
    
    if region == "中国":
        return f"{year}年{month}月{day}日 {hour}:{minute}:{second}"
    elif region == "美国":
        return f"{month}/{day}/{year} {hour}:{minute}:{second}"
    elif region in ["英国", "澳大利亚", "法国"]:
        return f"{day}/{month}/{year} {hour}:{minute}:{second}"
    elif region in ["德国", "俄罗斯"]:
        return f"{day}.{month}.{year} {hour}:{minute}:{second}"
    elif region == "加拿大":
        return f"{year}-{month}-{day} {hour}:{minute}:{second}"
    else:
        return "不支持的地区"

# 主循环：支持多次转换
while True:
    print("\n===== 时间格式转换 =====")
    try:
        year = int(input("请输入年："))
        month = int(input("请输入月："))
        day = int(input("请输入日："))
        hour = int(input("请输入时："))
        minute = int(input("请输入分："))
        second = int(input("请输入秒："))
        region = input("请输入地区（中国、美国、英国、德国、俄罗斯、澳大利亚、法国、加拿大）：")
        
        # 调用转换函数并输出结果
        result = convert_time(year, month, day, hour, minute, second, region)
        print(f"\n转换结果：{result}")
    except ValueError:
        print("输入错误！请确保时间参数为数字。")
    
    # 询问是否继续
    continue_choice = input("\n是否继续转换？（输入y继续，其他键退出）：").lower()
    if continue_choice != 'y':
        print("程序已退出，谢谢使用！")
        break